package com.usian.article.feign;

import com.usian.model.behavior.pojos.ApBehaviorEntry;
import com.usian.model.behavior.pojos.ApLikesBehavior;
import com.usian.model.behavior.pojos.ApUnlikesBehavior;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("leadnews-behavior")
public interface BehaviorFeign {

    @GetMapping("/api/v1/ap_behavior_entry/one")
    ApBehaviorEntry queryEntryByUserIdOrEquipmentId(
            @RequestParam Integer userId, @RequestParam Integer equipmentId);

    @GetMapping("/api/v1/likes_behavior/queryLikesByEntryIdAndArticleId")
    ApLikesBehavior queryLikesByEntryIdAndArticleId(@RequestParam Integer entryId,
                                                           @RequestParam Long articleId,
                                                           @RequestParam Short type);

    @GetMapping("/api/v1/unlikes_behavior/one")
    ApUnlikesBehavior queryUnlikeByEntryIdAndArticleId(
            @RequestParam Integer entryId, @RequestParam Long articleId);


}
